Skip to content

Fix GH-225#226

Merged
haszi merged 4 commits intophp:masterfrom
haszi:Fix-GH-225
Feb 5, 2026
Merged

Fix GH-225#226
haszi merged 4 commits intophp:masterfrom
haszi:Fix-GH-225

Conversation

@haszi
Copy link
Contributor

@haszi haszi commented Dec 12, 2025

Fixes #225 by preventing the serialization and deserialization of non-serializable properties. This could have been achieved with a reflection based approach but using a simple list is a good enough solution.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I didn't even know you could save PhD state.

public string $phpwebSourcesFilename = '';
public string $phpwebHistoryFilename = '';

private const NON_SERIALIZABLE_PROPERTIES = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private const NON_SERIALIZABLE_PROPERTIES = [
private const array NON_SERIALIZABLE_PROPERTIES = [

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type class constants are PHP 8.3+ I think and Phd is supposed to be on 8.1+ currently. We could add types for all constants in a separate PR if @Girgias thinks we can bump to 8.3 or 8.4.

@haszi haszi merged commit e012bdf into php:master Feb 5, 2026
9 checks passed
@haszi haszi deleted the Fix-GH-225 branch February 5, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

phd.config.php readonly property copyright not filtered

3 participants